package data

// RowId id
type RowId struct {
	Id int64 `gorm:"auto_increment;primary_key;not null;column:id;comment:id"`
}

// RowCreatedAt 创建时间
type RowCreatedAt struct {
	CreatedAt int64 `gorm:"column:created_at;not null;default:0;comment:创建时间"`
}

// RowUpdatedAt 更新时间
type RowUpdatedAt struct {
	UpdatedAt int64 `gorm:"column:updated_at;not null;default:0;comment:更新时间"`
}

// RowDeletedAt 删除时间
type RowDeletedAt struct {
	DeletedAt int64 `gorm:"column:deleted_at;not null;default:0;index;comment:删除时间"`
}

// RowVersionId 数据版本id
type RowVersionId struct {
	VersionId int64 `gorm:"column:version_id;not null;default:0;comment:版本id"`
}

// RowState 通用状态
type RowState struct {
	State int32 `gorm:"column:state;not null;comment:状态值"`
}

// RowSortNumber 排序字段,默认倒序
type RowSortNumber struct {
	SortNumber int32 `gorm:"column:sort_number;not null;default:0;comment:排序序号,默认降序;index"`
}

// RowPid 上级id
type RowPid struct {
	Pid int64 `gorm:"column:pid;not null;default:0;comment:上级id顶级为0"`
}

// RowNote 备注
type RowNote struct {
	Note string `gorm:"column:note;not null;default:'';size:255;comment:备注"`
}

// RowIsTop 是否置顶
type RowIsTop struct {
	IsTop int32 `gorm:"column:is_top;not null;default:0;comment:是否置顶"`
}

// RowUserId 用户id
type RowUserId struct {
	UserId int64 `gorm:"column:user_id;not null;default:0;comment:用户id"`
}

// RowArticleId 稿件id
type RowArticleId struct {
	ArticleId int64 `gorm:"column:article_id;not null;default:0;comment:稿件id"`
}

/* TABLE SCHEMA */

// RbacPermit RBAC权限表
type RbacPermit struct {
	RowId
	RowPid
	Category int32  `gorm:"column:category;not null;default:0;comment:权限分类 1:目录 2:菜单 3:功能"`
	Name     string `gorm:"column:name;not null;default:'';size:255;comment:权限名称"`
	Icon     string `gorm:"column:icon;not null;default:'';size:255;comment:权限图标"`
	Method   string `gorm:"column:method;not null;default:'';size:16;comment:请求方法"`
	Path     string `gorm:"column:path;not null;default:'';size:255;comment:请求路由"`
	RowNote
	RowSortNumber
	State         int32  `gorm:"column:state;not null;comment:权限状态 0:未启用 1:使用中"`
	ComponentPath string `gorm:"column:component_path;not null;default:'';comment:组件路径"`
	ComponentName string `gorm:"column:component_name;not null;default:'';comment:组件名称"`
	Visible       int32  `gorm:"column:visible;not null;default:0;comment:页面显示状态"`
	Redirect      string `gorm:"column:redirect;not null;default:'';comment:重定向地址"`
	PathUrl       string `gorm:"column:path_url;not null;default:'';comment:前端路径"`
	ActiveMenu    string `gorm:"column:active_menu;not null;default:'';comment:选中的菜单"`
	RowCreatedAt
	RowUpdatedAt
}

func (s RbacPermit) TableName() string {
	return "fx_rbac_permit"
}

// RbacRole RBAC角色表
type RbacRole struct {
	RowId
	Name       string `gorm:"column:name;not null;default:'';size:255;comment:角色名称"`
	Identifier string `gorm:"column:identifier;not null;default:'';size:32;comment:角色标识"`
	RowNote
	State int32 `gorm:"column:state;not null;comment:角色状态 0:未启用 1:使用中"`
	RowSortNumber
	RowCreatedAt
	RowUpdatedAt
}

func (s RbacRole) TableName() string {
	return "fx_rbac_role"
}

// RbacRolePermit RBAC角色绑定权限表
type RbacRolePermit struct {
	RowId
	RoleId   int64 `gorm:"column:role_id;not null;comment:角色id"`
	PermitId int64 `gorm:"column:permit_id;not null;comment:权限id"`
	RowCreatedAt
	RowUpdatedAt
}

func (s RbacRolePermit) TableName() string {
	return "fx_rbac_role_permit"
}

// RbacRoleUser RBAC角色绑定用户表
type RbacRoleUser struct {
	RowId
	RoleId int64 `gorm:"column:role_id;not null;comment:角色id"`
	RowUserId
	RowCreatedAt
	RowUpdatedAt
}

func (s RbacRoleUser) TableName() string {
	return "fx_rbac_role_user"
}

// User 用户表
type User struct {
	RowId
	Category     int32   `gorm:"column:category;not null;default:0;comment:分类 0:超级管理员 1:普通用户"`
	Mobile       *string `gorm:"column:mobile;default:null;size:32;comment:手机号;unique"`
	Username     *string `gorm:"column:username;default:null;size:32;comment:用户名;unique"`
	Email        *string `gorm:"column:email;default:null;size:128;comment:电子邮箱;unique"`
	PasswordSalt string  `gorm:"column:password_salt;not null;default:'';size:32;comment:密码盐"`
	Password     string  `gorm:"column:password;not null;default:'';size:128;comment:密码"`
	Integral     int64   `gorm:"column:integral;not null;default:0;comment:积分余额"`
	RealName     string  `gorm:"column:real_name;not null;default:'';size:32;comment:真实姓名"`
	IdCardNo     string  `gorm:"column:id_card_no;not null;default:'';size:32;comment:身份证号"`
	BankNo       string  `gorm:"column:bank_no;not null;default:'';size:32;comment:银行卡号"`
	BankOpen     string  `gorm:"column:bank_open;not null;default:'';size:255;comment:开户行"`
	Level        int32   `gorm:"column:level;not null;default:0;comment:账户等级"`
	RowNote
	IsInternal     int8   `gorm:"column:is_internal;not null;default:0;comment:是否是内部用户 0:否 1:是"`
	State          int32  `gorm:"column:state;not null;default:0;comment:账户状态 0:未知 1:正常 2:冻结 3:封号"`
	StateReason    string `gorm:"column:state_reason;not null;default:'';size:255;comment:账户状态异常原因"`
	LastFreezeAt   int64  `gorm:"column:last_freeze_at;not null;default:0;comment:最后一次冻结时间"`
	ReturnNormalAt int64  `gorm:"column:return_normal_at;not null;default:0;comment:恢复正常状态截止时间"`
	RowVersionId
	RowCreatedAt
	RowUpdatedAt
	RowDeletedAt
	IsVerifier int32 `gorm:"column:is_verifier;not null;default:0;comment:是否外置复核员 0:否 1:是"`
	UserId     int64 `gorm:"column:user_id;not null;default:0;comment:原用户id"`
}

func (s User) TableName() string {
	return "fx_user"
}

// UserWechat 用户微信表
type UserWechat struct {
	RowId
	RowUserId
	Openid     string `gorm:"column:openid;default:'';size:128;comment:openid"`
	Nickname   string `gorm:"column:nickname;default:'';size:128;comment:微信昵称"`
	Sex        int    `gorm:"column:sex;default:0;comment:微信性别"`
	Province   string `gorm:"column:province;default:'';size:128;comment:省份"`
	City       string `gorm:"column:city;default:'';size:128;comment:城市"`
	Country    string `gorm:"column:country;default:'';size:128;comment:国家"`
	HeadImgURL string `gorm:"column:head_img_url;default:'';size:128;comment:微信头像地址"`
	UnionID    string `gorm:"column:unionid;default:'';size:128;comment:unionid"`
	RowCreatedAt
}

func (s UserWechat) TableName() string {
	return "fx_user_wechat"
}

// UserIntegral 用户积分明细表
type UserIntegral struct {
	RowId
	Category int32 `gorm:"column:category;not null;default:0;comment:分类 0:未知 1:审读 2:提现"`
	RowUserId
	AssocId      int64 `gorm:"column:assoc_id;not null;default:0;comment:关联id"`
	ChangeBefore int64 `gorm:"column:change_before;not null;default:0;comment:变化之前的积分余额"`
	ChangeAmount int64 `gorm:"column:change_amount;not null;default:0;comment:变化的积分余额"`
	ChangeAfter  int64 `gorm:"column:change_after;not null;default:0;comment:变化之后的积分余额"`
	RowNote
	State     int32  `gorm:"column:state;not null;default:1;comment:账户状态 0:未知 1:待处理 9:已完成"`
	StateDesc string `gorm:"column:state_desc;not null;default:'';size:255;comment:状态描述"`
	OrderNo   string `gorm:"column:order_no;not null;default:'';size:128;comment:订单号"`
	RowCreatedAt
	RowUpdatedAt
}

func (s UserIntegral) TableName() string {
	return "fx_user_integral"
}

// UserWithdraw 用户提现明细表
type UserWithdraw struct {
	RowId
	RowUserId
	Category     int32 `gorm:"column:category;not null;default:0;comment:分类 1:提现"`
	ChangeBefore int64 `gorm:"column:change_before;not null;default:0;comment:变化之前的积分余额"`
	ChangeAmount int64 `gorm:"column:change_amount;not null;default:0;comment:变化的积分余额"`
	ChangeAfter  int64 `gorm:"column:change_after;not null;default:0;comment:变化之后的积分余额"`
	RowNote
	State     int32  `gorm:"column:state;not null;default:1;comment:账户状态 0:未知 1:待审批 5:未通过 9:已通过"`
	StateDesc string `gorm:"column:state_desc;not null;default:'';size:255;comment:状态描述"`
	OrderNo   string `gorm:"column:order_no;not null;default:'';size:128;comment:订单号"`
	RowCreatedAt
	RowUpdatedAt
}

func (s UserWithdraw) TableName() string {
	return "fx_user_withdraw"
}

// ApproveSources 信源表
type ApproveSources struct {
	RowId
	MediaId            int64   `gorm:"column:media_id;not null;default:0;comment:媒体id"`
	Media              string  `gorm:"column:media;not null;default:'';comment:媒体名称"`
	PlatformId         int64   `gorm:"column:platform_id;not null;default:0;comment:平台id"`
	Platform           string  `gorm:"column:platform;not null;default:'';comment:平台名称"`
	ChannelName        string  `gorm:"column:channel_name;not null;default:'';size:255;comment:频道名称"`
	SourceLabel        *string `gorm:"column:source_label;size:255;comment:来源标识"`
	SourceType         int32   `gorm:"column:source_type;not null;default:1;comment:来源类型 0:未知 1:抓取 2:接入"`
	Frequency          int32   `gorm:"column:frequency;not null;default:0;comment:频率(单位:分钟)"`
	Level              int32   `gorm:"column:level;not null;default:1;comment:等级 0:未知 1:重要 2:一般"`
	AutoMachine        int32   `gorm:"column:auto_machine;not null;default:1;comment:自动机审开关 0:关 1:开"`
	AutoMachineImage   int32   `gorm:"column:auto_machine_image;not null;default:0;comment:自动巡检图片开关 0:关 1:开"`
	AutoMachineVideo   int32   `gorm:"column:auto_machine_video;not null;default:0;comment:自动巡检视频开关 0:关 1:开"`
	ManualMachine      int32   `gorm:"column:manual_machine;not null;default:0;comment:人工巡检开关 0:关 1:开"`
	ManualMachineImage int32   `gorm:"column:manual_machine_image;not null;default:0;comment:人工巡检图片开关 0:关 1:开"`
	ManualMachineVideo int32   `gorm:"column:manual_machine_video;not null;default:0;comment:人工巡检视频开关 0:关 1:开"`
	Opened             int32   `gorm:"column:opened;not null;default:1;comment:是否开启 0:否 1:是"`
	IsPush             int32   `gorm:"column:is_push;not null;default:0;comment:是否推送 0:否 1:是"`
	RowCreatedAt
	RowUpdatedAt
	RowDeletedAt
}

func (s ApproveSources) TableName() string {
	return "fx_approve_sources"
}

// UserApproveSources 用户绑定信源表
type UserApproveSources struct {
	RowId
	RowUserId
	ApproveSourcesId int64 `gorm:"column:approve_sources_id;not null;default:0;comment:信源id"`
	RowCreatedAt
	RowUpdatedAt
}

func (s UserApproveSources) TableName() string {
	return "fx_user_approve_sources"
}

// SystemNotice 系统公告表
type SystemNotice struct {
	RowId
	Category int32  `gorm:"column:category;not null;default:1;comment:公告分类 1:系统公告"`
	Title    string `gorm:"column:title;not null;default:'';size:255;comment:标题"`
	Content  string `gorm:"column:content;comment:内容"`
	State    int32  `gorm:"column:state;not null;default:1;comment:审读状态 1:待发布 9:已发布 17:已删除"`
	IsTop    int8   `gorm:"column:is_top;not null;default:0;comment:是否置顶 0:否 1:是"`
	RowSortNumber
	PublishAt     int64 `gorm:"column:publish_at;not null;default:0;comment:发布时间"`
	PublishUserId int64 `gorm:"column:publish_user_id;not null;default:0;comment:发布者"`
	RowCreatedAt
	RowUpdatedAt
}

func (s SystemNotice) TableName() string {
	return "fx_system_notice"
}

// UserMessage 用户消息表
type UserMessage struct {
	RowId
	Category int32 `gorm:"column:category;not null;default:1;comment:消息分类 1:系统公告"`
	RowUserId
	AssocId    int64 `gorm:"column:assoc_id;not null;default:1;comment:关联id"`
	UserReadAt int64 `gorm:"column:user_read_at;not null;default:0;comment:用户阅读时间"`
	RowCreatedAt
	RowUpdatedAt
}

func (s UserMessage) TableName() string {
	return "fx_user_message"
}

// SystemConfig 系统配置表
type SystemConfig struct {
	RowId
	CfgKey string  `gorm:"column:cfg_key;not null;default:'';size:3;comment:配置键"`
	CfgVal *string `gorm:"column:cfg_val;type:text;comment:配置值"`
	RowNote
	RowCreatedAt
	RowUpdatedAt
}

func (s SystemConfig) TableName() string {
	return "fx_system_config"
}

// Article 稿件表
type Article struct {
	RowId
	Title                string  `gorm:"column:title;not null;default:'';size:255;comment:标题"`
	Content              *string `gorm:"column:content;type:longtext;comment:内容"`
	SourceId             int64   `gorm:"column:source_id;not null;default:0;comment:平台来源id"`
	Keyword              string  `gorm:"column:keyword;not null;default:'';size:255;comment:关键词"`
	Category             int32   `gorm:"column:category;not null;default:0;comment:任务分类 1:推送任务 2:人工提交任务"`
	ReaderId             int64   `gorm:"column:reader_id;not null;default:0;comment:审读员id,锁定审读员"`
	ReaderAt             int64   `gorm:"column:reader_at;not null;default:0;comment:审读员领取任务时间"`
	VerifierId           int64   `gorm:"column:verifier_id;not null;default:0;comment:复核员id"`
	VerifierAt           int64   `gorm:"column:verifier_at;not null;default:0;comment:复核员介入时间"`
	State                int32   `gorm:"column:state;not null;default:0;comment:审读状态 0:未知 1:未领取 9:审读中 17:待复核 25:已结案 33:已超时"`
	Claimed              int32   `gorm:"column:claimed;not null;default:0;comment:任务分类 0:未被领取 1:已被领取 2:已审读完成"`
	PublishAt            int64   `gorm:"column:publish_at;not null;default:0;comment:发布时间;index"`
	DeadlineAt           int64   `gorm:"column:deadline_at;not null;default:0;comment:截止时间;index"`
	Editor               string  `gorm:"column:editor;not null;default:'';size:32;comment:稿件编辑"`
	EditorCharge         string  `gorm:"column:editor_charge;not null;default:'';size:32;comment:稿件责编"`
	EditorMain           string  `gorm:"column:editor_main;not null;default:'';size:32;comment:稿件主编"`
	PlatformEditor       string  `gorm:"column:platform_editor;not null;default:'';size:32;comment:稿件编辑(当前平台)"`
	PlatformEditorCharge string  `gorm:"column:platform_editor_charge;not null;default:'';size:32;comment:稿件责编(当前平台)"`
	PlatformEditorMain   string  `gorm:"column:platform_editor_main;not null;default:'';size:32;comment:稿件主编(当前平台)"`
	SourceUrl            *string `gorm:"column:source_url;type:text;comment:源文链接"`
	Briefing             *string `gorm:"column:briefing;type:text;comment:稿件简报"`
	CategoryType         int32   `gorm:"column:category_type;not null;default:0;comment:自定词中严重错误 0:正常 1:严重错误"`
	AutoCheck            int32   `gorm:"column:auto_check;not null;default:0;comment:机审状态 0:未审 1:已审"`
	ManualCheck          int32   `gorm:"column:manual_check;not null;default:0;comment:人审状态 0:未审 1:已审"`
	ManualCheckVideo     int32   `gorm:"column:manual_check_video;not null;default:0;comment:视频人审状态 0:未审 1:已审"`
	ManualCheckImage     int32   `gorm:"column:manual_check_image;not null;default:0;comment:图片人审状态 0:未审 1:已审"`
	RowCreatedAt
	RowUpdatedAt
	RowDeletedAt
	MediaIdManual     int64  `gorm:"column:media_id_manual;not null;default:0;comment:媒体id-人工提交"`
	ProblemAreaManual string `gorm:"column:problem_area_manual;not null;default:'';comment:问题区域-人工提交"`
	ArticleId         int32  `gorm:"column:article_id;not null;default:0;comment:源稿件id"`
	SyncError         int32  `gorm:"column:sync_error;not null;default:0;comment:是否同步稿件差错 0:否 1:是"`
}

func (s Article) TableName() string {
	return "fx_article"
}

type ArticleReader struct {
	RowId
	ArticleId  int64  `gorm:"column:article_id;not null;default:0;comment:稿件id"`
	ReaderId   int64  `gorm:"column:reader_id;not null;default:0;comment:审读员id"`
	ReaderAt   int64  `gorm:"column:reader_at;not null;default:0;comment:审读员领取任务时间"`
	DeadlineAt int64  `gorm:"column:deadline_at;not null;default:0;comment:审读截止时间;index"`
	State      int32  `gorm:"column:state;not null;default:0;comment:审读状态 1:审读中 2:已审读 3:已撤回 4:待复核 5:已超时 6:已结案 7:已退回"`
	CommitAt   int64  `gorm:"column:commit_at;not null;default:0;comment:审读员提交时间"`
	Note       string `gorm:"column:note;not null;default:0;comment:备注"`
	RowCreatedAt
	RowUpdatedAt
	RowDeletedAt
}

func (s ArticleReader) TableName() string {
	return "fx_article_reader"
}

// ArticleRecords 稿件差错表
type ArticleRecords struct {
	RowId
	RowArticleId
	FromType             int32   `gorm:"column:from_type;not null;default:0;type:tinyint;comment:差错来源类型 0:未知 1:机器巡检 2:审读员提交 3:人工提交"`
	ReaderId             int64   `gorm:"column:reader_id;not null;default:0;comment:审读员id"`
	ReaderAt             int64   `gorm:"column:reader_at;not null;default:0;comment:审读员审读时间"`
	ReaderCheck          int8    `gorm:"column:reader_check;not null;default:0;comment:审读员确认差错 0:未判定 1:判定有误 2:判定无误"`
	ReaderDraft          int32   `gorm:"column:reader_draft;not null;default:0;comment:是否草稿 0:否 1:是"`
	VerifierId           int64   `gorm:"column:verifier_id;not null;default:0;comment:复核员id"`
	ErrorCategory        int32   `gorm:"column:error_category;not null;default:0;comment:差错分类 0:未知 1:文本问题 2:图片问题 3:视频问题 7:其它问题"`
	ErrorUrls            *string `gorm:"column:error_urls;type:text;comment:差错URL地址合集(存:图片URL地址,视频URL地址,人提问题截图URL地址)"`
	ErrorLocation        *string `gorm:"column:error_location;type:text;comment:差错位置(视频帧),例:标题"`
	ErrorType            string  `gorm:"column:error_type;not null;default:'';size:32;comment:差错类型,例:政治性差错"`
	ErrorTypeInt         int32   `gorm:"column:error_type_int;not null;default:0;comment:差错分类整型值"`
	ErrorSubtype         string  `gorm:"column:error_subtype;not null;default:'';size:32;comment:差错子类型,例:涉政人物"`
	ErrorReason          string  `gorm:"column:error_reason;not null;default:'';size:32;comment:差错原因,例:错别字,标点符号,少字错误,禁用词"`
	ErrorMessage         string  `gorm:"column:error_message;not null;default:'';size:255;comment:差错描述语,例:标题出现禁用词XX"`
	ErrorModifyAdvice    *string `gorm:"column:error_modify_advice;type:text;comment:修改建议,例:建议更改为YY"`
	ErrorLevel           int32   `gorm:"column:error_level;not null;default:0;comment:差错等级 0:未知 1:疑错 2:一般 3:严重"`
	ErrorContent         *string `gorm:"column:error_content;type:text;comment:差错内容"`
	ErrorVideoScreenshot *string `gorm:"column:error_video_screenshot;type:text;comment:视频截图URL地址合集"`
	ReaderScore          int32   `gorm:"column:reader_score;not null;default:0;comment:审读员得分"`
	VerifierScoreAt      int64   `gorm:"column:verifier_score_at;not null;default:0;comment:复核员打分时间"`
	Misjudged            int32   `gorm:"column:misjudged;not null;default:0;type:tinyint;comment:是否误判 0:否,1:是"`
	Note                 *string `gorm:"column:note;type:text;comment:备注"`
	ConfidenceLevel      float64 `gorm:"column:confidence_level;not null;default:0;type:decimal(10,2);comment:置信度,如:1.23"`
	ConclusionType       int32   `gorm:"column:conclusion_type;not null;default:0;comment:结论类型"`
	Conclusion           string  `gorm:"column:conclusion;not null;default:'';size:255;comment:结论"`
	RowCreatedAt
	RowUpdatedAt
	RowDeletedAt
	ArticleRecordsId int64 `gorm:"column:article_records_id;not null;default:0;comment:源差错id"`
}

func (s ArticleRecords) TableName() string {
	return "fx_article_records"
}

// ArticleRecordsDisposal 差错处置记录表
type ArticleRecordsDisposal struct {
	RowId
	Pid int64 `gorm:"column:pid;not null;default:0;comment:上级id"`
	RowUserId
	ArticleRecordsId int64   `gorm:"column:article_records_id;not null;default:0;comment:差错id"`
	Content          *string `gorm:"column:content;comment:处置记录描述"`
	RowNote
	RowCreatedAt
	RowUpdatedAt
	RowDeletedAt
}

func (s ArticleRecordsDisposal) TableName() string {
	return "fx_article_records_disposal"
}

// ArticleLedger 稿件台账表
type ArticleLedger struct {
	RowId
	RowUserId
	Category    int32  `gorm:"column:category;not null;default:0;comment:分类 0:未知 1:单篇 2:时间段"`
	Filename    string `gorm:"column:filename;not null;default:'';size=255;comment:文件名称"`
	Filepath    string `gorm:"column:filepath;not null;default:'';size=255;comment:文件路径"`
	State       int32  `gorm:"column:export_at;not null;default:0;comment:状态 0:未知 1:进行中 2:已完成 3:失败"`
	FinishAt    int64  `gorm:"column:export_at;not null;default:0;comment:完成时间"`
	StartTimeAt int64  `gorm:"column:start_time_at;not null;default:0;comment:台账开始时间"`
	EndTimeAt   int64  `gorm:"column:end_time_at;not null;default:0;comment:台账结束时间"`
	RowNote
	RowCreatedAt
	RowUpdatedAt
}

func (s ArticleLedger) TableName() string {
	return "fx_article_ledger"
}

// RunValue 运行配置值
type RunValue struct {
	Id          int64   `gorm:"auto_increment;primary_key;not null;column:id;comment:id"`
	RunKey      string  `gorm:"column:run_key;default:'';size:32;comment:唯一键;unique"`
	RunVal      string  `gorm:"column:run_val;default:'';size:255;comment:值"`
	RunValInt   int64   `gorm:"column:run_val_int;default:0;comment:整型值"`
	RunValFloat float64 `gorm:"column:run_val_float;default:0;type:decimal(20,8);comment:小数值"`
	Note        string  `gorm:"column:note;not null;default:'';size:255;comment:备注"`
	VersionId   int64   `gorm:"column:version_id;not null;default:0;comment:版本id"`
	RowCreatedAt
	RowUpdatedAt
	RowDeletedAt
}

func (s RunValue) TableName() string {
	return "fx_run_value"
}

type Topic struct {
	Id        int64  `gorm:"auto_increment;primary_key;not null;column:id;comment:id"`
	TopicId   int64  `gorm:"column:topic_id;not null;default:0;comment:专题id"`
	Title     string `gorm:"column:title;not null;default:'';size:255;comment:专题标题"`
	Keyword   string `gorm:"column:keyword;not null;default:'';size:255;comment:专题关键字"`
	State     int32  `gorm:"column:state;not null;default:0;comment:是否启用 0:禁用 1:启用"`
	CreatedAt int64  `gorm:"column:created_at;not null;default:0;comment:创建时间"`
}

func (s Topic) TableName() string {
	return "fx_topic"
}

type Export struct {
	Id               int64  `gorm:"auto_increment;primary_key;not null;column:id;comment:id"`
	Category         int32  `gorm:"column:category;not null;default:0;comment:导出分类 1:台账 2:xxx 3:xxx"`
	UserId           int64  `gorm:"column:user_id;not null;default:0;comment:用户id"`
	DownloadFilename string `gorm:"column:download_filename;not null;default:'';size:128;comment:下载文件名称"`
	FilePath         string `gorm:"column:file_path;not null;default:'';size:255;comment:文件路径"`
	DataFilePath     string `gorm:"column:data_file_path;not null;default:'';size:255;comment:数据文件路径"`
	State            int32  `gorm:"column:state;not null;default:0;comment:状态 1:进行中 9:已完成 17:导出失败"`
	Retry            int32  `gorm:"column:retry;not null;default:0;comment:重试次数"`
	CreatedAt        int64  `gorm:"column:created_at;not null;default:0;comment:创建时间"`
	UpdatedAt        int64  `gorm:"column:updated_at;not null;default:0;comment:更新时间"`
	DeletedAt        int64  `gorm:"column:deleted_at;not null;default:0;index;comment:删除时间"`
}

func (s Export) TableName() string {
	return "fx_export"
}
